FROM anietof/oracle-12c-initialized:latest
# FROM oracle-12c:latest
# FROM pubrepo.jiagouyun.com/image-repo-for-testing/oracle:12c-se-datakit

# ADD instantclient_21_10 /opt/instantclient/
# ADD oracle /opt/oracle/oracle
# ADD run.sh /docker-entrypoint-initdb.d/run.sh
ADD run1.sh /home/oracle/run1.sh
ADD run2.sh /home/oracle/run2.sh
ADD entrypoint.sh /entrypoint.sh

# ENV LD_LIBRARY_PATH=/opt/instantclient

# USER root

RUN mkdir -p /usr/local/datakit/externals \
  && chown -R oracle:dba /usr/local/datakit/externals \
  && chown -R oracle:dba /u01/app/oracle \
  && chown -R oracle:dba /docker-entrypoint-initdb.d \
  && chown -R oracle:dba /entrypoint.sh \
  && rm -rf /docker-entrypoint-initdb.d/run.sh \
  && rm -rf /opt/*

# USER oracle

# ENTRYPOINT ["/entrypoint.sh"]
